[MBL-19958][Student] Migrate dashboard course widget to GraphQL#3648
Merged
hermannakos merged 8 commits intomasterfrom Apr 22, 2026
Merged
[MBL-19958][Student] Migrate dashboard course widget to GraphQL#3648hermannakos merged 8 commits intomasterfrom
hermannakos merged 8 commits intomasterfrom
Conversation
Replace N+2 sequential REST API calls with a single GraphQL query for the dashboard courses widget. Previously, loading the widget required fetching all courses, dashboard cards, and then announcements for each visible course individually. Now a single DashboardCoursesQuery fetches courses, dashboard card info, enrollments, and announcements in one round-trip with depagination support. Also fixes pre-existing nullability issues in SubmissionRubricManagerImpl, SubmissionContentManagerImpl, and SubmissionGradeManagerImpl caused by the schema update. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Tue, 21 Apr 2026 13:58:31 GMT |
Contributor
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
Tests that uninstall GraphQlApiModule need a fake binding for the new DashboardCoursesManager interface. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
tamaskozmer
requested changes
Apr 17, 2026
kdeakinstructure
requested changes
Apr 17, 2026
Contributor
There was a problem hiding this comment.
- This issue might not related directly to the PR but I'm highlighting it since it can be reproduced clearly so we should fix it, whether here or in a separate ticket. The issue is that giving a nickname to the course and tapping on 'Done' button (to save it) won't be applied ever.
Screen_recording_20260417_104201.mp4
- By measuring loading time, with 8-9 courses it's kind of a 4ish (so double than the target 2). However, far more better than it was before. So I think we could 'live with this', but since there was an exact target number I was picked this up as an issue.
Contributor
I think we might improve it more with my suggestions. After implementing it please test again with your user. |
- Add explicit page size (first: 20) for announcement queries - Fix visible courses filter: use dashboardCard presence instead of isFavorite to match the old DashboardCards behavior - Drop announcements from DashboardSingleCourseQuery since reloadCourse is called from course customization where announcements don't change - Create separate CourseAnnouncementsQuery for per-course announcement depagination instead of re-fetching all courses on each page - Simplify DashboardCoursesQuery to a single non-paginated request, with per-course depagination handled by getCourseAnnouncements() - Update tests for all changes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tamaskozmer
requested changes
Apr 21, 2026
Contributor
There was a problem hiding this comment.
QA:
- I think we are not considering announcement replies in the unread count. Test it with Kristóf's student user. I can see only 3 unread announcements for CourseOne, while it's actually 12 on master, and you can see that it is 12 also when you open the announcement list.
- Use GRAPHQL_PAGE_SIZE parameter instead of hardcoded page size - Pass endCursor from initial query to getCourseAnnouncements to avoid fetching the first page twice during depagination - Restore LoadDashboardCardsUseCase composition in LoadVisibleCoursesUseCase so dashboard card visibility and ordering are correct - Apply course nickname from DashboardCard.shortName during reload - Add test for nickname reload behavior Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show the announcement badge when either the announcement header itself is unread or it has unread entries (replies). Add entryCounts to both GraphQL queries and update filtering logic accordingly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
tamaskozmer
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test plan
refs: MBL-19958
affects: Student
Release note
Improved dashboard course widget loading performance by migrating to GraphQL, reducing multiple sequential network requests to a single query.
Checklist